package com.example.demo.mapper;


import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PeopleinfoMapper {
    @Insert("insert into l1(id,peoplename,password,email,createtime) values(#(id),#(peoplename),#(password),#(email),#(createtime)")
    public int insertUser(User user);
    @Delete("delete from l1 where id={id};")
    public int delete(int id);
    @Select("select from peoplename like peoplename（peoplename（'%',#{peoplename}））")
    public List<User> getAll(String username);

}
